<admintpl file="header" />
</head>
<body>
<div class="wrap">
	<ul class="nav nav-tabs">
		<li><a href="{:U('Banners/index')}">轮播图列表</a></li>
		<li><a href="{:U('Banners/add')}">添加轮播图</a></li>
		<li class="active"><a href="javascript:;">编辑轮播图</a></li>
	</ul>
	<form method="post" class="form-horizontal js-ajax-form" enctype="multipart/form-data" action="{:U('Banners/edit_post')}">
		<fieldset>
			<div class="control-group">
				<label class="control-label"><b style="color:red;">* </b> 分类名称</label>
				<div class="controls">
					<select name="banner_type">
						<option value="">请选择</option>
						<option value="index" <if condition="$banners['banner_type'] eq index">selected</if> >首页轮播图</option>
						<option value="shop_discount" <if condition="$banners['banner_type'] eq 'shop_discount'">selected</if> >店铺优惠轮播图</option>
						<option value="welfare" <if condition="$banners['banner_type'] eq 'welfare'">selected</if> >会员福利轮播图</option>
					</select>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label"><b style="color:red;">* </b> 轮播图</label>
				<div class="controls">
					<input type="file" name="banner_img">
					<input type="hidden" name="image_url" value="{$banners.banner_img}">
					<img src="<php>echo '/'.C('UPLOADPATH').$banners['banner_img']</php>" width="100px">
					&nbsp; <b style="color:red">*</b>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label"> 跳转链接</label>
				<div class="controls">
					<input type="text" name="banner_link" value="{$banners.banner_url}">
				</div>
			</div>
			<div class="control-group">
				<label class="control-label">{:L('STATUS')}</label>
				<div class="controls">
					<if condition="$banners.use_flg eq 1">
						<label class="radio inline" for="active_true"><input type="radio" name="use_flg" value="1" checked  />{:L('ENABLED')}</label>
						<label class="radio inline" for="active_false"><input type="radio" name="use_flg" value="0"  >{:L('DISABLED')}</label>
					<else />
						<label class="radio inline" for="active_true"><input type="radio" name="use_flg" value="1" />{:L('ENABLED')}</label>
						<label class="radio inline" for="active_false"><input type="radio" name="use_flg" value="0" checked >{:L('DISABLED')}</label>
					</if>
				</div>
			</div>
		</fieldset>
		<div class="form-actions">
			<input type="hidden" name="id" value="{$banners.id}">
			<button type="submit" class="btn btn-primary js-ajax-submit" >{:L('EDIT')}</button>
			<a class="btn" href="javascript:history.back(-1);">{:L('BACK')}</a>
		</div>
	</form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>